package com.cob.main;

import com.dalonedrau.opengl.GameFont;
import com.dalonedrau.opengl.ProjectConstants;
import com.dalonedrau.opengl.ui.GuiComponent;
import com.dalonedrau.opengl.ui.Label;
import com.dalonedrau.opengl.ui.menu.MenuItem;

public class COBFactory {
	/** singleton. */
	private static COBFactory	instance;
	/**
	 * Gives access to the singleton instance of {@link COBFactory}.
	 * @return {@link COBFactory}
	 */
	public static COBFactory getInstance() {
		if (COBFactory.instance == null) {
			COBFactory.instance = new COBFactory();
		}
		return COBFactory.instance;
	}
	public Label getSNESLabel(final String text) {
		Label label = new Label(
				GameFont.valueOf(ProjectConstants.getInstance().getFontH1()),
				text);
		label.setBorder(new SNESBorder());
		return label;
	}
	/**
	 * Gets a standard menu item, with an arrow highlight.
	 * @param text the menu item's text
	 * @return {@link MenuItem}
	 */
	public MenuItem getStandardMenuItem(final String text) {
		MenuItem item = new MenuItem(
				GameFont.valueOf(ProjectConstants.getInstance().getFontH1()),
				text
				);
		item.setAlignment(GuiComponent.CENTER, GuiComponent.CENTER);
		item.setHighlightBorder(new H1SelectionBorder());
		return item;
	}
}
